<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>提交订单</title>
		<link rel="stylesheet" type="text/css" href="/Public/Home/css/head.css" />
		<link rel="stylesheet" type="text/css" href="/Public/Home/css/footer.css" />
		<link rel="stylesheet" type="text/css" href="/Public/Home/css/go.css" />
	<link rel="stylesheet" href="/Public/Home/goods/style/fillin.css" type="text/css">
<script src="/Public/Home/js/jquery-1.7.2.min.js" type="text/javascript" charset="utf-8"></script>
		<script>
// 判断登录状态 
$.ajax({
	type : "GET",
	url : "<?php echo U('Member/ajaxChkLogin'); ?>",
	dataType : "json",
	success : function(data)
	{
		if(data.login == 1)
			var li = '您好，'+data.username+' [<a href="<?php echo U('Member/logout'); ?>">退出</a>]';
		else
			var li = '您好，欢迎来到快乐购！[<a href="<?php echo U('Member/login'); ?>">登录</a>] [<a href="<?php echo U('Member/regist'); ?>">免费注册</a>]'
		$("#logInfo").html(li);
	}
});
</script>
	</head>
	<body>
		<div class="header">
			<div class="header_top">
				<div class="w1200">
					<div class="h_t_l">
						<div class="login_l">
							<div id="logInfo"></div>
						</div>
					</div>
					<div class="h_t_r">
						<ul>
							<li>
								<a href="">订单查询</a>
								<span class="line"></span>
							</li>
							<li>
								<a href="">我的快乐购</a>
								<span class="line"></span>
							</li>
							<li>
								<i class="tel_icon"></i>
								<a href="">400-705-1111</a>
								<span class="line"></span>
							</li>
							<li>
								<a href="">下载快乐购app</a>
								<span class="line"></span>
							</li>
							<li>
								<a href="">客服中心</a>
							</li>
						</ul>
					</div>
				</div>
			</div>
			<!--图片-->
			<div class="full_sc order_bottom">
				<div class="w1200 header_conter ">
					<div class="h_c_logo">
						<a href="index.html">
							<img src="/Public/Home/image/logo.jpg" />
						</a>
					</div>
					<div class="h_c_right">
						<div class="order_Status os_oredr"></div>
					</div>
				</div>
			</div>
			<!--end-->
		</div>
		<div class="public_b">
			
				<div class="w1200">
					<div class="h2">确认订单信息</div>
					<!--地址选择-->
					<div class="o_o_content">
						<h2 class="part_h2">
							1 地址选择
							<span class="addr_errtips">
								<i class="icon_err"></i>
								您好！此地址不在该商品配送区域范围内，请选择其他收货地址！
							</span>
						</h2>
						<div class="new_addr">
							<div class="ncc-form-default">
								<form action="/index.php/Home/Order/add.html" method="post" id="formm">

									<input value="buy" name="act" type="hidden">
									<input value="add_addr" name="op" type="hidden">
									<input name="form_submit" value="ok" type="hidden">
									<dl>
										<dt><i class="required">*</i>收货人姓名：</dt>
										<dd>
											<input class="text w100" name="shr_name" maxlength="20" id="true_name" value="" type="text">
										</dd>
									</dl>
									<dl>
										<dt><i class="required">*</i>所在地区：</dt>
										<dd>
											<div id="region">
						<select name="shr_province" id="statename">
            	                    <option value="0">请选择省份</option>
            						<option value="P10">北京市</option>
									<option value="P11">上海市</option>
									<option value="P12">天津市</option>
									<option value="P13">河北省</option>
									<option value="P14">黑龙江省</option>
									<option value="P15">吉林省</option>
									<option value="P16">辽宁省</option>
									<option value="P17">内蒙古自治区</option>
									<option value="P18">山西省</option>
									<option value="P19">陕西省</option>
									<option value="P20">宁夏回族自治区</option>
									<option value="P21">甘肃省</option>
									<option value="P22">青海省</option>
									<option value="P23">新疆维吾尔自治区</option>
									<option value="P24">西藏自治区</option>
									<option value="P25">四川省</option>
									<option value="P26">河南省</option>
									<option value="P27">山东省</option>
									<option value="P28">江苏省</option>
									<option value="P29">安徽省</option>
									<option value="P30">湖北省</option>
									<option value="P31">湖南省</option>
									<option value="P32">贵州省</option>
									<option value="P33">云南省</option>
									<option value="P34">江西省</option>
									<option value="P35">浙江省</option>
									<option value="P36">福建省</option>
									<option value="P37">广东省</option>
									<option value="P38">广西壮族自治区</option>
									<option value="P39">海南省</option>
									<option value="P41">重庆市</option>
									<option value="P42">台湾省</option>
				        </select>
									<select name="shr_city" id="city">
				<option value="">请选择城市</option>
				<option value="朝阳区">朝阳区</option>
									<option value="东城区">东城区</option>
									<option value="西城区">西城区</option>
									<option value="海淀区">海淀区</option>
									<option value="昌平区">昌平区</option>
			</select>
									<select name="shr_area" id="county">
			<option value="">请选择区县</option>
			
									
									<option value="西二旗">二环内</option>
									<option value="西三旗">三环内</option>
									<option value="三环以内">四环环以内</option>						
								
			</select>
									
												<!-- <input value="" name="city_id" id="city_id" type="hidden">
												<input name="area_id" id="area_id" class="area_ids" type="hidden">
												<input name="area_info" id="area_info" class="area_names" type="hidden">
												<input value="" name="statename_name" id="statename_name" type="hidden">
												<input value="" name="city_name" id="city_name" type="hidden">
												<input value="" name="county_name" id="county_name" type="hidden">
												<input value="" name="town_name" id="town_name" type="hidden">
												<input value="" name="transpzone_id" id="transpzone_id" type="hidden">
												<input value="" name="receiver_seq_id" id="receiver_seq_id" type="hidden"> -->

											</div>
										</dd>
									</dl>
									<dl>
										<dt><i class="required">*</i>详细地址：</dt>
										<dd>
											<input class="text w500" name="shr_address" id="address" maxlength="80" value="" type="text">
											<p class="hint">请填写真实地址，不需要重复填写所在地区</p>
										</dd>
									</dl>
									<dl>
										<dt> <i class="required">*</i>手机号码：</dt>
										<dd>
											<input class="text w200" name="shr_tel" id="mob_phone" maxlength="15" value="" type="text"> 
										</dd>
									</dl>
									<!-- <div class="btn_item">
										<a href="javascript:;" class="btn_addaddr">确定</a>　<a href="javascript:;" class="btn_addaddr" onclick="submitAddList();">返回</a>
									</div> -->

								</form>
							</div>
						</div>
						<div style="display: none;" class="addr_list" id="addr_list">
							<ul>
								<li class="addr_new">
									<div class="btn_new_addr" nc_type="addr" id="add_addr">添加新地址</div>
								</li>
							</ul>
						</div>
						

	
					
			<div class="goods">
				
				<table>
					<thead>
						<tr>
							<th class="col1">商品名称</th>
							<th class="col2">商品信息</th>
							<th class="col3">单价</th>
							<th class="col4">数量</th>	
							<th class="col5">小计</th>
						</tr>
					</thead>
					<tbody>
						<?php  $tp = 0; foreach ($data as $k => $v): ?>
						<tr>
							<td class="col1"><a href=""><?php showImage($v['mid_logo']); ?></a>  
							<strong><a href="<?php echo U('Index/goods?id='.$v['goods_id']); ?>"><?php echo $v['goods_name']; ?></a></strong></td>
							<td class="col2"> 
								<?php foreach ($v['gaData'] as $k1 => $v1): ?>
									<p><?php echo $v1['attr_name']; ?>：<?php echo $v1['attr_value']; ?></p>
								<?php endforeach; ?>
							</td>
							<td class="col3">￥<span><?php echo $v['price']; ?>元</span></td>
							<td class="col4"><?php echo $v['goods_number']; ?></td>
							<td class="col5">￥<span><?php $xj = $v['price'] * $v['goods_number'];$tp+=$xj;echo $xj; ?></span></td>
						</tr>
						<?php endforeach; ?>
					</tbody>
					<tfoot>
						<tr>
							<td colspan="6">购物金额总计： <strong>￥ <span id="total"><?php echo $tp; ?></span></strong></td>
						</tr>
					</tfoot>
				</table>
			</div>
			<!-- 商品清单 end -->
								<!--shoplist-->
								<!--优惠卷-->
								<!-- <div class="border_b">
									<div class="user_jf_yhj">
										<div class="user_jf_yhj_t">
											<b>-</b>使用积分和优惠券
										</div>
									</div>
									<div class="use_jf_yhj_c">
										<div class="order_items">
											<div class="yhj_show">使用优惠券：</div>
											<select name="">
                                                <option value="0">----不使用----</option>
                                                <option value="5285942">5(188元新人套券-5元)</option>
                                                <option value="5285943">10(188元新人套券-10元)</option>
                                                <option value="5285944">20(188元新人套券-20元)</option>
                                           </select>
										</div>
									</div>
								</div> -->
								<!--优惠卷-->
								<!--结算-->
								<div class="yhxx_box">
									<ul class="yhxx_list">
										<li>
											<div class="yhxx_tit">商品总额<span class="yhxx_money">￥<span><?php echo $tp; ?></span> </span>
											</div>
										</li>
										<me id="paypromotion"></me>
										<me id="paypromotion_info"></me>
										<li>
											<div class="yhxx_tit">优惠券<span class="yhxx_money"><span class="s_jian">-</span>￥<span id="voucher_price">0</span> </span>
											</div>
										</li>
										<li class="margin_top10">
											<div class="yhxx_tit">本单应付 <span class="yhxx_money">￥<span class="s_sum s_order_money"><?php echo $tp; ?></span> </span>
											</div>
										</li>
									</ul>
								</div>
								<!--结算-->
								<!--发票-->
								<div class="ask_bill">
									<p>
										<label class="lab_bill">
                                            <input name="fapiao" value="1" checked="" type="checkbox">
                                            <span>索要发票</span>
                                       </label>
									</p>
									<ul class="ask_bill_ul">
										<li fapiao_type="电子发票" class="on">电子发票<b></b></li>
										<li fapiao_type="普通发票">普通发票<b></b></li>
									</ul>
									<p class="bill_c">
										发票抬头：
										<label class="lab_bill p_r_30">
                                            <input name="" value="1" checked="checked" type="radio"><span>个人</span>
                                        </label>
										<label class="lab_bill">
                                            <input name="" value="2" type="radio"><span>单位</span>
                                        </label>
									</p>
									<div class="bill_c bill_unit" style="display:none;">
										<p>
											<span class="bill_c_name">单位名称：  </span>
											<input class="bill_itxt" name="fapiao_danwei" type="text">
										</p>
										<p class="bill_tips">温馨提示：您填写的内容将被系统自动打印到发票上，请勿填写发票抬头无关的信息.</p>
									</div>
								</div>
								<!--发票-->
								<div class="btnsure_bg">
									<div class="sureorder">
										<div class="jine">应付总额：<span class="fwxh_30">￥</span><span class="span_m s_order_money"><?php echo $tp; ?></span></div>
										<a id="tijiao" href="javascript:void(0);" class="un_btn_sure"><span>提交订单</span></a>
									</div>
								</div>
							</div>
						</div>
						<!--商品-->
					</div>
					<!--地址选择end-->
				</div>
			
		</div>
	    <!--底部公用-->
	    <div class="footer no-margin-top">
	    	<div class="footer_b w1200"><img src="/Public/Home/image/foot_img1.jpg"/></div>
	    	<div class="footer_help w1200">
	    		<div class="footer1_l">
	    			<dl class="helpDl">
	    				<dt><h5>使用帮助</h5></dt>
	    				<dd><a href="">税费收取规则 </a></dd>
	    				<dd><a href="">新手指南 </a></dd>
	    			    <dd><a href="">常见问题 </a></dd>
	    				<dd><a href="">用户协议 </a></dd>
	    			</dl>
	    			<dl class="helpDl">
	    				<dt><h5>会员服务</h5></dt>
	    				<dd><a href="">积分政策  </a></dd>
	    				<dd><a href="">会员权益  </a></dd>
	    			    <dd><a href="">会员等级  </a></dd>
	    			</dl>
	    			<dl class="helpDl">
	    				<dt><h5>支付方式</h5></dt>
	    				<dd><a href="">积分支付  </a></dd>
	    				<dd><a href="">货到付款  </a></dd>
	    			    <dd><a href="">在线支付  </a></dd>
	    				<dd><a href="">优惠券支付  </a></dd>
	    			</dl>
	    			<dl class="helpDl">
	    				<dt><h5>配送方式</h5></dt>
	    				<dd><a href="">包邮政策   </a></dd>
	    				<dd><a href="">费用说明   </a></dd>
	    			    <dd><a href="">配送说明   </a></dd>
	    			</dl>
	    			<dl class="helpDl">
	    				<dt><h5>售后服务</h5></dt>
	    				<dd><a href="">电子发票   </a></dd>
	    				<dd><a href="">售后咨询   </a></dd>
	    			    <dd><a href="">退货办理   </a></dd>
	    				<dd><a href="">退货政策   </a></dd>
	    			</dl>
	    		</div>
	    		<div class="footer1_r">
	    			<ul>
	    				<li>
	    					<h2>手机快乐购</h2>
	    					<img src="/Public/Home/image/footer_ewm_01.png"/>
	    					<p>下载移动客户端</p>
	    				</li>
	    				<li>
	    					<h2>快乐购微信</h2>
	    					<img src="/Public/Home/image/footer_ewm_02.png"/>
                            <p>快乐购官方微信</p>
	    				</li>
	    			</ul>
	    		</div>
	    	</div>
	        <div class="footer_nav">
	        	<div class="w720">
	        		<ul>
	        			<li>
	        				<a href="">关于快乐购 </a>
	        				<span class="line"></span>
	        			</li>
	        			<li>
	        				<a href="">投资者关系 </a>
	        				<span class="line"></span>
	        			</li>
	        			<li>
	        				<a href="">商家入驻  </a>
	        				<span class="line"></span>
	        			</li>
	        			<li>
	        				<a href="">联系我们 </a>
	        				<span class="line"></span>
	        			</li>
	        		</ul>
	        	</div>
	        </div>
	        <div class="footer_bottom">
	        	<div class="w1200">
	        		<p>
	        			<span class="font_arial">Copyright© 2006-2016 happigo. All Rights Reserved </span>
                                           免费服务热线: 400-705-1111 | 固话也可拨打: 800-705-1111
                        <span class="font_arial">E-Mail: service@happigo.com</span><br>
                                           湘ICP备12000157号 信息网络传播视听节目许可证号：1810530
	        		</p>
	        		<p class="footer_b">
	        			<a href="http://www.itrust.org.cn/home/index/itrust_certifi/wm/2782875193.html">
	        				<img src="/Public/Home/image/foot_img3.png"/>
	        			</a>
	        			<a href="https://search.szfw.org/cert/l/CX20150428007576007720">
	        				<img src="/Public/Home/image/foot_img4.png"/>
	        			</a>
	        		</p>
	        	</div>
	        </div>
	    </div>
	    <!--底部end-->
	</body>
	<script>
$("#tijiao").click(function(){
	var data=$('#formm').serializeArray();
	$.post('<?php echo U('Order/add'); ?>',data,function(res){
        if (res.status==1) {
            location.href=res.data;
        }else if(res.status==0){
            alert(res.message);
        }
   },'JSON');
});

	</script>
</html>